﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="slideManageUC.ascx.cs" Inherits="VCN.admin.UC.slideManageUC" %>
<%@ Register Src="~/admin/UC/UploadUc.ascx" TagName="UploadUc" TagPrefix="uc1" %>
<style type="text/css">
    .lblStatus_css
    {
     text-align:left;
    	}          
</style>
<table width="100%">
    <tr>
        <td colspan="4">
          <h2 style="text-align:center; color:#0099FF; font-size:x-large" >QUẢN LÝ ẢNH SLIDE TRANG CHỦ</h2>  
        </td>
    </tr>
    <tr>
                <td colspan="2">
                <asp:Label ID="lblChose" runat="server" Visible="false"></asp:Label>
                <asp:Label ID="lblId" runat="server" Visible="false"></asp:Label>
                    <hr />
                </td>
            </tr>
            
     
        <tr>
            <td class="style1">
                Hình ảnh:
            </td>
            <td>           
                <uc1:UploadUc ID="ucupload" runat="server" /> 
                            </td>
        </tr>
        <tr>
                <td class="style1">
                    Thứ tự hiện:</td>
                <td>
                    <asp:DropDownList ID="drdNo" runat="server" Width="150px">
                        <asp:ListItem Text="1" Value="1"></asp:ListItem>
                        <asp:ListItem Text="2" Value="2"></asp:ListItem>
                        <asp:ListItem Text="3" Value="3"></asp:ListItem>
                        <asp:ListItem Text="4" Value="4"></asp:ListItem>
                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                        <asp:ListItem Text="6" Value="6"></asp:ListItem>
                        <asp:ListItem Text="7" Value="7"></asp:ListItem>
                        <asp:ListItem Text="Không hiện" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                    </td>
            </tr>
        <tr>
            <td class="style6">
                <hr />
            </td>
            <td>
            </td>
        </tr>        
        <tr>
            <td class="style7">
            </td>
            <td>
                <asp:Button ID="m_bnt_submit" OnClick="bnt_upload_click" runat="server" Text="Thêm mới"
                    Width="82px" Height="22px"/>
            </td>
        </tr>
    <tr><td></td><td><asp:Label ID="lblStatus" CssClass="lblStatus_css" runat="server" Text=""></asp:Label></td></tr>
    <tr>
            <td style="color: #0099FF; width: 98px">
                </td>
            <td align="right" style="color: #0099FF; width: 98px">                
            <b>Trạng thái :</b>
    <asp:DropDownList ID="ddl_Category" runat="server" Width="178px" AutoPostBack="true" 
                    onselectedindexchanged="ddl_Category_SelectedIndexChanged" >
        <asp:ListItem Selected="True" Value="1">Đang hiển thị</asp:ListItem>
        <asp:ListItem Value="0">Chưa hiển thị</asp:ListItem>
        <asp:ListItem Value="2">Toàn bộ</asp:ListItem>
    </asp:DropDownList>
            </td>
        </tr>        
</table><br />
<asp:GridView ID="m_dt_grv" runat="server" AutoGenerateColumns="False" 
    CellPadding="4" DataKeyNames="ID" 
    OnRowDeleting="gridProduct_Delete" OnRowEditing="gridProduct_Edit"
    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
    ForeColor="Black" CssClass="grvGroupnews" AllowPaging="True"
    Width="100%">
    <RowStyle BackColor="#F7F7DE" />
    <Columns> 
    <asp:TemplateField HeaderText="Thứ tự">
        <ItemStyle HorizontalAlign="Center" />
        <ItemTemplate>       
            <%# Eval("Order") %>
        </ItemTemplate>        
    </asp:TemplateField>       
    <asp:TemplateField HeaderText="Hình ảnh">
        <ItemTemplate>
            <asp:Image runat="server" AlternateText="Slide's picture" Height="100px" Width="300px" ImageUrl='<%# "~/home/Images/SlideShow/" +  Eval("IMAGE")%>' />
        </ItemTemplate>
        <ItemStyle HorizontalAlign="Center" />
    </asp:TemplateField>        
            <asp:BoundField DataField="Image" HeaderText="Tên ảnh" />                    
    <asp:TemplateField HeaderText="Sửa" >
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnEdit" runat="server" Text="Edit" CommandName="Edit"><img title="Sửa" src="img/edit.png" alt="Edit"/></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="5%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Xóa">
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="Delete" CommandName="Delete"
                        OnClientClick="return confirm('Bạn có chắc rằng bạn muốn xóa ?');"><img title="Xóa" src="img/deletered.png" alt="Delete" /></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="5%" />
            </asp:TemplateField>
    
    </Columns>
    <FooterStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#7C6F57" />
        <AlternatingRowStyle BackColor="White" />
</asp:GridView>
